home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / canvtxtinfo.z / canvtxtinfo
Text File  |  1998-10-30  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____CCCCaaaannnnvvvvaaaassssTTTTeeeexxxxttttIIIInnnnffffoooo((((3333TTTTkkkk))))                                  TTTTkkkk____CCCCaaaannnnvvvvaaaassssTTTTeeeexxxxttttIIIInnnnffffoooo((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_CanvasTextInfo - additional information for managing text items in
  10.      canvases
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  14.  
  15.      Tk_CanvasTextInfo *
  16.      TTTTkkkk____CCCCaaaannnnvvvvaaaassssGGGGeeeettttTTTTeeeexxxxttttIIIInnnnffffoooo(_c_a_n_v_a_s)
  17.  
  18. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  19.      Tk_Canvas   _c_a_n_v_a_s   (in)      A token that identifies a particular
  20.                                     canvas widget.
  21.  
  22.  
  23.  
  24. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  25.      Textual canvas items are somewhat more complicated to manage than other
  26.      items, due to things like the selection and the input focus.
  27.      TTTTkkkk____CCCCaaaannnnvvvvaaaassssGGGGeeeettttTTTTeeeexxxxttttIIIInnnnffffoooo may be invoked by a type manager to obtain
  28.      additional information needed for items that display text.  The return
  29.      value from TTTTkkkk____CCCCaaaannnnvvvvaaaassssGGGGeeeettttTTTTeeeexxxxttttIIIInnnnffffoooo is a pointer to a structure that is
  30.      shared between Tk and all the items that display text.  The structure has
  31.      the following form:
  32.           typedef struct Tk_CanvasTextInfo {
  33.                Tk_3DBorder _s_e_l_B_o_r_d_e_r;
  34.                int _s_e_l_B_o_r_d_e_r_W_i_d_t_h;
  35.                XColor *_s_e_l_F_g_C_o_l_o_r_P_t_r;
  36.                Tk_Item *_s_e_l_I_t_e_m_P_t_r;
  37.                int _s_e_l_e_c_t_F_i_r_s_t;
  38.                int _s_e_l_e_c_t_L_a_s_t;
  39.                Tk_Item *_a_n_c_h_o_r_I_t_e_m_P_t_r;
  40.                int _s_e_l_e_c_t_A_n_c_h_o_r;
  41.                Tk_3DBorder _i_n_s_e_r_t_B_o_r_d_e_r;
  42.                int _i_n_s_e_r_t_W_i_d_t_h;
  43.                int _i_n_s_e_r_t_B_o_r_d_e_r_W_i_d_t_h;
  44.                Tk_Item *_f_o_c_u_s_I_t_e_m_P_t_r;
  45.                int _g_o_t_F_o_c_u_s;
  46.                int _c_u_r_s_o_r_O_n;
  47.           } Tk_CanvasTextInfo;
  48.      The sssseeeellllBBBBoooorrrrddddeeeerrrr field identifies a Tk_3DBorder that should be used for
  49.      drawing the background under selected text.  _s_e_l_B_o_r_d_e_r_W_i_d_t_h gives the
  50.      width of the raised border around selected text, in pixels.
  51.      _s_e_l_F_g_C_o_l_o_r_P_t_r points to an XColor that describes the foreground color to
  52.      be used when drawing selected text.  _s_e_l_I_t_e_m_P_t_r points to the item that
  53.      is currently selected, or NULL if there is no item selected or if the
  54.      canvas doesn't have the selection.  _s_e_l_e_c_t_F_i_r_s_t and _s_e_l_e_c_t_L_a_s_t give the
  55.      indices of the first and last selected characters in _s_e_l_I_t_e_m_P_t_r, as
  56.      returned by the _i_n_d_e_x_P_r_o_c for that item.  _a_n_c_h_o_r_I_t_e_m_P_t_r points to the
  57.      item that currently has the selection anchor;  this is not necessarily
  58.      the same as _s_e_l_I_t_e_m_P_t_r.  _s_e_l_e_c_t_A_n_c_h_o_r is an index that identifies the
  59.      anchor position within _a_n_c_h_o_r_I_t_e_m_P_t_r.  _i_n_s_e_r_t_B_o_r_d_e_r contains a
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____CCCCaaaannnnvvvvaaaassssTTTTeeeexxxxttttIIIInnnnffffoooo((((3333TTTTkkkk))))                                  TTTTkkkk____CCCCaaaannnnvvvvaaaassssTTTTeeeexxxxttttIIIInnnnffffoooo((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      Tk_3DBorder to use when drawing the insertion cursor;  _i_n_s_e_r_t_W_i_d_t_h gives
  75.      the total width of the insertion cursor in pixels, and _i_n_s_e_r_t_B_o_r_d_e_r_W_i_d_t_h
  76.      gives the width of the raised  border around the insertion cursor.
  77.      _f_o_c_u_s_I_t_e_m_P_t_r identifes the item that currently has the input focus, or
  78.      NULL if there is no such item.  _g_o_t_F_o_c_u_s is 1 if the canvas widget has
  79.      the input focus and 0 otherwise.  _c_u_r_s_o_r_O_n is 1 if the insertion cursor
  80.      should be drawn in _f_o_c_u_s_I_t_e_m_P_t_r and 0 if it should not be drawn;  this
  81.      field is toggled on and off by Tk to make the cursor blink.
  82.  
  83.      The structure returned by TTTTkkkk____CCCCaaaannnnvvvvaaaassssGGGGeeeettttTTTTeeeexxxxttttIIIInnnnffffoooo is shared between Tk and
  84.      the type managers;  typically the type manager calls TTTTkkkk____CCCCaaaannnnvvvvaaaassssGGGGeeeettttTTTTeeeexxxxttttIIIInnnnffffoooo
  85.      once when an item is created and then saves the pointer in the item's
  86.      record.  Tk will update information in the Tk_CanvasTextInfo;  for
  87.      example, a ccccoooonnnnffffiiiigggguuuurrrreeee widget command might change the _s_e_l_B_o_r_d_e_r field, or
  88.      a sssseeeelllleeeecccctttt widget command might change the _s_e_l_e_c_t_F_i_r_s_t field, or Tk might
  89.      change _c_u_r_s_o_r_O_n in order to make the insertion cursor flash on and off
  90.      during successive redisplays.
  91.  
  92.      Type managers should treat all of the fields of the Tk_CanvasTextInfo
  93.      structure as read-only, except for _s_e_l_I_t_e_m_P_t_r, _s_e_l_e_c_t_F_i_r_s_t, _s_e_l_e_c_t_L_a_s_t,
  94.      and _s_e_l_e_c_t_A_n_c_h_o_r.  Type managers may change _s_e_l_e_c_t_F_i_r_s_t, _s_e_l_e_c_t_L_a_s_t, and
  95.      _s_e_l_e_c_t_A_n_c_h_o_r to adjust for insertions and deletions in the item (but only
  96.      if the item is the current owner of the selection or anchor, as
  97.      determined by _s_e_l_I_t_e_m_P_t_r or _a_n_c_h_o_r_I_t_e_m_P_t_r).  If all of the selected text
  98.      in the item is deleted, the item should set _s_e_l_I_t_e_m_P_t_r to NULL to
  99.      indicate that there is no longer a selection.
  100.  
  101.  
  102. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  103.      canvas, focus, insertion cursor, selection, selection anchor, text
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.